package com.flx.dis.registry.zk.service.impl;

import com.flx.common.mybatis.base.BaseDO;
import com.flx.dis.registry.zk.entity.UserDO;
import com.flx.dis.registry.zk.manager.UserManager;
import com.flx.dis.registry.zk.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author Fenglixiong
 * @Create 2022/4/19 0:49
 * @Description
 **/
@Slf4j
@Service
@SuppressWarnings("unchecked")
public class UserServiceImpl implements UserService {

    @Autowired
    private UserManager userManager;

    public BaseDO get(Long id)throws Exception{
        return userManager.get(id);
    }

    public Long add(UserDO userDO) throws Exception{
        return userManager.add(userDO);
    }

    public int update(UserDO userDO)throws Exception{
        return userManager.update(userDO);
    }

    public int delete(Long id)throws Exception{
        return userManager.delete(id);
    }

}
